{{ define "main" }}
<main class="main pub inner" data-sidebar-position="{{ $.Param "sidebarPosition" }}">
  {{ if eq .Permalink .FirstSection.Permalink }}
    <section class="pub__section lmr">
      {{ partial "publication/pub-toolbar" . }}
      {{ partial "publication/pub-overview" . }}
      {{ partial "script/pub-overview-script" . }}
    </section>
  {{ else }}
    <section class="pub__section lmr">
      {{ partial "publication/pub-toolbar" . }}
      {{ partial "publication/pub-list" . }}
      <div class="grow"></div>
      {{ partial "pagination/pagination" . }}
    </section>
  {{ end }}

  {{ partial "script/pub-list-script" . }}
  <div class="hide">
    {{ partial "search/site-search" . }}
  </div>
</main>
{{ end }}